package com.com.effectivejava.generalprogramming;

import java.util.Random;

/**
 * Created by pankaj on 7/8/14.
 */
public class RandomNumber {
    public static Random random = new Random();

    public static int generateRandomNumbet(int n){
        return Math.abs(random.nextInt()) % n;

    }

    public static void main(String... a){
        int n = generateRandomNumbet(5);
        System.out.println("Random Number: "+ n);
    }
}
